package com.zxy.supplier_system.server.repository

import com.zxy.supplier_system.server.entity.Employee
import com.zxy.supplier_system.server.entity.Notification
import org.springframework.data.jpa.repository.JpaRepository
import java.time.OffsetDateTime

interface NotificationRepository:JpaRepository<Notification,Int> {

    fun findAllByConsumedDateTimeIsNullAndReceiver(receiver: Employee):List<Notification>

    fun deleteByConsumedDateTimeBeforeOrConsumedDateTimeIsNull(consumedDateTime: OffsetDateTime)


}
